////#define _CRT_SECURE_NO_WARNINGS
////#include <stdio.h>
////#include <string.h>
////#define size 7     
////void Sort(char* a[size]) {
////	for (int i = 0; i < size - 1; i++) {
////		for (int j = 0; j < size - i - 1; j++) {
////			if (strcmp(a[j], a[j + 1]) > 0) {
////				char* tmp = a[j];
////				a[j] = a[j + 1];
////				a[j + 1] = tmp;
////			}
////		}
////	}
////
////}
////
////int main() {
////	char* a[size] = { "Pascal","Basic","Fortran", "Java","Visual C", "Bad", "Force" };
////
////	Sort(a);
////	for (int i = 0; i < size; i++) {
////		printf("%s ", a[i]);
////	}
////	return 0;
////}
//
//
//
#define _CRT_SECURE_NO_WARNINGS  
#include <stdio.h>  
#include <string.h>  
#define size 7    


void swap(char** a, char** b) {
	char* tmp = *a;
	*a = *b;
	*b = tmp;
}

void Sort(char** a, int n) {
	char** end = a + n;
	for (char** i = a; i < end - 1; i++) {
		for (char** j = a; j < end - 1 - (i - a); j++) {
			if (strcmp(*j, *(j + 1)) > 0) {
				swap(j, (j + 1));
			}
		}
	}
}

int main() {
	char* a[size] = { "Pascal","Basic","Fortran", "Java","Visual C", "Bad", "Force" };

	Sort(a, size);
	for (int i = 0; i < size; i++) {
		printf("%s ", a[i]);
	}
	printf("\n");
	return 0;
}
